import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Main from '../views/Main.vue'

Vue.use(VueRouter)

const routes = [{
		path: '/',
		name: 'Home',
		component: Home,
		children: [{
				path: '/home',
				name: 'Main',
				component: () => import('../views/Main.vue')
			},
			{
				path: '/home/shopcart',
				name: 'Shop',
				component: () => import('../views/ShopCart.vue')
			},
			{
				path: '/home/order',
				name: 'Order',
				component: () => import('../views/Order.vue')
			},
			{
				path: '/home/mine',
				name: 'Mine',
				component: () => import('../views/Mine.vue'),
			},
			{
				path: '/home/main',
				name: 'Main',
				component: () => import('../views/Main.vue'),
			}
		]
	},
	{
		path: '/about',
		name: 'About',
		component: () => import('../views/About.vue')
	},
	{
		path: '/login',
		name: 'Login',
		component: () => import('../views/Login.vue')
	},
	{
		path: '/main',
		name: 'Main',
		component: () => import('../views/Main.vue')
	},
	{
		path: '/register',
		name: 'Register',
		component: () => import('../views/Register.vue')
	},
	{
		path: '/find',
		name: 'Find',
		component: () => import('../views/Find.vue')
	},
	{
		path: '/newaddress',
		name: 'Newaddress',
		component: () => import('../views/Newaddress.vue'),
	},
	{
		path: '/Editaddress',
		name: 'EditAddress',
		component: () => import('../views/EditAddress.vue'),
	},
	{
		path: '/Address',
		name: 'Address',
		component: () => import('../views/Address.vue'),
	},
	{
		path: '/submitbox',
		name: 'Submitbox',
		component: () => import('../views/Submitbox.vue'),
	},
	{
		path: '/confirmorder',
		name: 'Confirmorder',
		component: () => import('../views/Confirmorder.vue'),
	},
	{
		path: '/merchantdetails',
		name: 'Merchantdetails',
		component: () => import('../views/Merchantdetails.vue'),
	},
	{
		path: '/merchantdetail',
		name: 'Merchantdetail',
		component: () => import('../views/Merchantdetail.vue'),
	},
	{
		path: '/paymentbox',
		name: 'Paymentbox',
		component: () => import('../views/Paymentbox.vue'),
	},
	{
		path: '/find',
		name: 'Find',
		component: () => import('../views/Find.vue'),
	},
	{
		path: '/search',
		name: 'Search',
		component: () => import('../views/Search.vue'),
	},
	{
		path: '/searchs',
		name: 'Searchs',
		component: () => import('../views/Searchs.vue'),
	},

]

const router = new VueRouter({
	routes
})

export default router
